#pragma once

#include "primitive.h"
#include "vector3.h"

namespace raytrace {

class Material;
class Ray;
class Sphere;

class Torus : public Primitive {
 public:
  Torus(const Vector3& pos, float inner_r, float outer_r,
        const Material* material);
  virtual ~Torus();

  virtual bool IntersectsWith(const Ray& ray, float& d) const;
  virtual Vector3 NormalAt(const Vector3& pt) const;

  virtual Vector3 GetRandomPoint() const;
  
  virtual const char* type() const { return "torus"; }

 private:
  // TODO: should this be in Primitive?
  Sphere* bounding_sphere_;
  float inner_r_;
  float outer_r_;
};
}
